package org.goldfish.client_demo;

import java.util.Scanner;

import org.goldfish.distributed_framework.GoldfishFramework;
import org.goldfish.distributed_framework.client.RpcClient;

public class ClientDemo {
    public static void main(String[] args) throws Exception {
        GoldfishFramework.initClient();
        System.out.println("客户端启动成功");
        String line;
        try (Scanner scanner = new Scanner(System.in)) {
            line = scanner.nextLine();
        }
        System.out.println("输入的内容是: " + line);
        Object result
                // = RpcClient.call("JobService",
                // new JobQueryRequest("Java工程师"))
                = RpcClient.call("echo", "handle", line
        );
        System.out.println("收到服务端响应: " + result);


    }
}
